import request from "../utils/request"

/**
 * 
 * @param {*} data 
 * @returns 添加编辑房屋
 */
export const addhouseAPI = (data) => {
  return request.post('/room',data)
}

/**
 * 
 * @param {*} 无 
 * @returns 查询房屋列表
 */
export const gethouselistAPI = () => {
  return request.get('/room')
}

/**
 * 
 * @param {*} id
 * @returns 查询房屋详情
 */
export const detailhouseAPI = id => {
  return request.get(`/room/${id}`)
}

/**
 * 
 * @param {*} id
 * @returns 删除房屋
 */
export const delhouseAPI = id => {
  return request.delete(`/room/${id}`)
}

/**
 * 
 * @param {*} 无
 * @returns 查询审核通过的房屋
 */
export const reviewhouseAPI = () => {
  return request.get('/house')
}